<?php
namespace Admin\Controller;
use think\console\command\make\Model;
use Think\Controller;
class SuperController extends Controller {
    public function index() {
        $this->display("list");
    }
    public function addYonghu() {
        $theuser=D('theuser');
        $where['username']=$_POST['username'];
        $where['password']=$_POST['password'];
        $where['name']=$_POST['name'];
        $where['cengji']=0;
        if ($_POST['username']==$_POST['password'])
        {
            if ($theuser->create($where))
            {
                $theuser->add($where);
                $this->success('添加成功',U('Home/SuperManager/addStudent'));
            }else{
                var_dump($theuser->getError());
            }

        }else{
            echo "<script>alert('密码和用户名必须相等');</script>";
        }

    }
}